# Maintainer: Jelle van der Waa <jelle@archlinux.org>

pkgname=python-libcharon
pkgver=5.0.0
pkgrel=2
pkgdesc="Python File metadata and streaming library"
url="https://github.com/Ultimaker/libCharon"
arch=(any)
license=("AGPL")
depends=('python' 'python-dbus')
makedepends=('python-setuptools')
checkdepends=('python-pytest')
source=(libcharon-$pkgver.tar.gz::https://github.com/Ultimaker/libCharon/archive/${pkgver}.tar.gz)
sha512sums=('e7402ee1fcf2f601d4b0ff665121e220aca946df9dcb7e3484eddff63f0f69d475989f9a7a9beaf932bde3d979faf907162d6be8241842e6095f32a9be7c886d')

build() {
  cd libCharon-$pkgver
  python setup.py build
}

check() {
  cd libCharon-$pkgver
  pytest tests
}

package() {
  cd libCharon-$pkgver
  python setup.py install --root="$pkgdir" --optimize=1 --skip-build
}
